# -*- mode: snippet -*-
#name: getopt template
#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil))
# --
try:
    opts, args = getopt.getopt(sys.argv[1:], "${1:f}:")
except getopt.GetoptError, e:
    print e
    sys.exit(2)
if opts:
    for o, a in opts:
        if o in ("-$1",):
            $0
else:
    print """
Usage:
    %(cmd)s
    """ % {"cmd": sys.argv[0]}
    sys.exit(1)